/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ar.com.wholeconsulting.pacc.gui.utils.treetable.aparatos;

import ar.com.wholeconsulting.pacc.gui.utils.treetable.TreeTableNode;
import ar.com.wholeconsulting.pacc.model.Aparato;
import ar.com.wholeconsulting.pacc.model.Usuario;

/**
 *
 * @author pable
 */
public class AparatosTreeTableNode extends TreeTableNode{

    public AparatosTreeTableNode(Usuario usuario) {
        super(usuario.getNombre(),"",usuario);
        for(Aparato aparato : usuario.getAparatos()){
            this.getChildren().add(new TreeTableNode(aparato.getModelo().getNombre(),aparato.getDescripcion(),aparato));
        }
    }

}
